﻿using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using SuperSocket;

namespace Lawn.AppServer
{
    public class ExceptionHandler<TPackageInfo>
    {
        public Func<IAppSession, PackageHandlingException<TPackageInfo>, ValueTask<bool>> ErrorHandler;

        public static async ValueTask<bool> HandlerError(IAppSession session, PackageHandlingException<TPackageInfo> handlingException)
        {
             
            session.GetDefaultLogger().LogInformation(handlingException,"error");

            return await Task.FromResult<bool>(true);
        }
    }
}